<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="../../../include/admincontent.jsp" %>
<% String basepaths = request.getContextPath(); %>
<div id="Content" style="min-width: 1740px">
  <%--  <div class="btnbar">
        <button type="button" class="list" id="nz_lyplan">安排报到</button>
        <button type="button" class="list" id="nz_lymsg">发布报到通知</button>
        <button type="button" class="save" id="savebtn">保存报到结果</button>
        <button type="button" class="back" onclick="javascript:history.go(-1);">返 回</button>
    </div>--%>

      <div class="toolbars" style="height:30px;white-space:nowrap;width:auto;margin-left: 10px;" totalwidth="314">
          <a id="bd_plan">
              <em class="ico16 sort_text_16"></em>
              <span class="menu_span" title="报到安排">报到安排</span>
          </a>
          <a id="bd_msg" style="margin-left: 5px">
              <em  class="ico16 common_language_16"></em>
              <span  class="menu_span" title="发短信">发短信</span>
          </a>
          <a id="bd_result" style="margin-left: 5px">
              <em  class="ico16 entrust_16"></em>
              <span  class="menu_span" title="记录报到结果">记录报到结果</span>
          </a>
          <a id="bd_HR" style="margin-left: 5px">
              <em  class="ico16 behavioranalysis_down"></em>
              <span  class="menu_span" title="同步到HR">同步到HR</span>
          </a>
          <a id="gxpublisharrange" style="margin-left: 5px">
              <em class="ico16 plan_16"></em>
              <span class="menu_span" title="公布/屏蔽安排" fid="${fid}" deptcode="${deptcode}">公布/屏蔽安排</span>
          </a>
          <a id="publishresult" style="margin-left: 5px">
              <em  class="ico16 plan_16"></em>
              <span  class="menu_span" title="公布/屏蔽结果" fid="${fid}" deptcode="${deptcode}">公布/屏蔽结果</span>
          </a>
          <a id="bd_down" style="margin-left: 5px">
              <em  class="ico16 behavioranalysis_down"></em>
              <span  class="menu_span" title="导出照片">导出照片</span>
          </a>
          <a id="resume_output" style="margin-left: 5px">
              <em  class="ico16 behavioranalysis_down"></em>
              <span  class="menu_span" title="导出">导出</span>
          </a>
          <a id="resume_input" style="margin-left: 5px">
              <em  class="ico16 behavioranalysis_up"></em>
              <span  class="menu_span" title="导入">导入</span>
          </a>
          <a id="dosz_tjgwNew" style="margin-left: 5px">
              <em  class="ico16 sort_ch_16"></em>
              <span  class="menu_span" title="推荐其他岗位"  pid="${pid}" fid="${fid}" deptcode="${deptcode}">推荐其他岗位</span>
          </a>
          <a id="resume_down_zip" style="margin-left: 5px">
              <em  class="ico16 download_online_16"></em>
              <span  class="menu_span" title="下载简历">下载简历</span>
          </a>
          <a id="send_news" style="margin-left: 5px">
              <em  class="ico16 info_16"></em>
              <span  class="menu_span" title="消息通知">消息通知</span>
          </a>
      </div>

    <!-- 报到安排 -->
      <div id="planpanel" style="height: 400px;display: none">
          <form id="thisform1" method="post" action="/Do/NZEmploy/PlanAction?pid=${pid}&fid=${fid}&deptcode=${deptcode}">
              <table class="treeTable searchform">
                  <thead>
                  <tr>
                      <td width="60">报到时间：</td>
                      <td width="150">
                          <div>
                              <input type="text" name="bdtime" datatype="*" nullmsg="报到时间不能为空！" class="select"
                                     onFocus="blur()"
                                     onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm',min:''})"/>
                          </div>

                          <%--                        <div class="layui-inline" style="width: 100%;" >
                                                      <div class="layui-input-inline" style="width: 100%;">
                                                          <input class="layui-input" name="bdtime"  style="width: 100%;height: 24px" id="bdtime" type="text">
                                                      </div>
                                                  </div>--%>
                      </td>
                      <td width="60">报到地点：</td>
                      <td width="300">
                          <div>
                              <select type="text" name="bdaddress" datatype="*" nullmsg="报到地点不能为空！">${address}</select>
                          </div>
                      </td>
                      <td></td>
                  </tr>
                  <tr>
                      <td>联 系 人：</td>
                      <td>
                          <div><input type="text" name="bdlxr" datatype="*" nullmsg="联系人不能为空！"/></div>
                      </td>
                      <td>联系电话：</td>
                      <td>
                          <div><input type="text" name="bdlxdh" datatype="*" nullmsg="联系电话不能为空！"/></div>
                      </td>
                      <td></td>
                  </tr>
                  <tr>
                      <td>注意事项：</td>
                      <td colspan="3">
                          <div>
                              <%-- <textarea name="bdzysx" id="bdzysx" style="width:99%;height:150px;"> ${bdzysx}</textarea>--%>
                              <textarea name="bdzysx" id="bdzysx" style="height:auto;overflow-x:visible;overflow-y:visible;">${bdzysx}</textarea>
                          </div>
                      </td>
                      <%--<td style="text-align:left" >体检注意事项,如无注意事项<a href="javascript:clearZysx()">清除</a>内容即可</td>--%>
                      <td style="text-align:left" >报到注意事项</td>
                  </tr>
                  <tr>
                      <td></td>
                      <td style="text-align: right">
                          <button type="submit" class="save">提 交</button>
                      </td>
                      <td colspan="3" style="text-align: left">
                          系统提示：参加报到的人员请从下面列表中勾选</td>
                  </tr>
                  </thead>
              </table>
              <div id="bdusers"></div>
          </form>
      </div>

    <!-- 报到通知 -->
    <div id="msgpanel" class="condition_cont">
        <form id="thisform2" method="post"
              action="${path}/Do/NZEmploy/MsgAction?pid=${pid}&fid=${fid}&deptcode=${deptcode}">
            <table class="treeTable searchform">
                <thead>
                <tr>
                    <td width="60">短信模版：</td>
                    <td width="500">
                        <div><select id="dxmb" datatype="*" nullmsg="短信模版不能为空！">${dxmb}</select></div>
                    </td>
                    <td></td>
                </tr>
                <tr>
                    <td>短信内容：</td>
                    <td>
                        <div><textarea name="dxnr" datatype="*" nullmsg="短信内容不能为空！"></textarea></div>
                    </td>
                    <td></td>
                </tr>
                <tr>
                    <td></td>
                    <td>
                        <button type="submit" class="save">提 交</button>
                    </td>
                    <td></td>
                </tr>
                </thead>
            </table>
            <div id="msgusers"></div>
        </form>
    </div>

      <!-- 报到结果 -->
      <div id="resultpanel" class="condition_cont">
          <form id="thisform3" method="post" action="/Do/SZEmploy/RAction?pid=${pid}&fid=${fid}&deptcode=${deptcode}">
              <table class="treeTable searchform">
                  <thead>
                  <tr>
                      <td width="55">报到结果:</td>
                      <td width="100">
                          <div>
                              <select name="bdstate">
                                  <option value="已报到">已报到</option>
                                  <option value="未报到">未报到</option>
                              </select>
                          </div>
                      </td>
                      <td width="30">备注:</td>
                      <td width="300">
                          <div><input type="text" name="bdremark"/></div>
                      </td>
                      <td></td>
                  </tr>
                  <tr>
                      <td></td>
                      <td colspan="4">
                          <button type="submit" class="op">保存报到结果</button>
                      </td>
                  </tr>
                  </thead>
              </table>
              <div id="rusers"></div>
          </form>
      </div>

      <!-- 同步到HR -->
      <div id="hrpanel" class="condition_cont">
          <form id="thisform4" method="post" action="/IHR/SendPerson">
              <input type="hidden" name="ufrom" value="SZ"/>
              <table class="treeTable searchform">
                  <thead>
                  <tr>
                      <td width="80">进入集团日期:</td>
                      <td width="100">
                          <div><input name="indate" type="text" class="select" datatype="*" nullmsg="进入集团日期不能为空"
                                      onfocus="blur()" onclick="laydate({istime: false,format:'YYYY-MM-DD'})"/></div>
                      </td>
                      <td></td>
                  </tr>
                  <tr>
                      <td></td>
                      <td colspan="3">
                          <button type="submit" class="op">提交数据</button>
                      </td>
                  </tr>
                  </thead>
              </table>
              <div id="hrusers"></div>
          </form>
      </div>

      <!-- 消息通知 -->
      <div id="infospanel"  class="condition_cont">
          <form id="infosform" method="post" action="/Do/SendInfos/SendInfosAction?pid=${pid}&fid=${fid}&deptcode=${deptcode}">
              <table class="treeTable searchform">
                  <thead>
                  <tr>
                      <td width="100">消息内容:</td>
                      <td width="500">
                          <div><textarea name="infoContent" datatype="*" nullmsg="消息内容不能为空！"></textarea></div>
                      </td>
                      <td></td>
                  </tr>
                  <tr>
                      <td></td>
                      <td>
                          <button type="submit" class="op">发送消息通知</button>
                      </td>
                      <td></td>
                  </tr>
                  </thead>
              </table>
              <div id="infosuers"></div>
              <div id="infosuerCardnos"></div>
          </form>
      </div>

    <!-- 筛选条件 -->
      <div id="searchbox">
          <form id="sform">
              <input type="hidden" name="proid" value="${pid}"/>
              <input type="hidden" name="path" value="${fid}"/>
              <input type="hidden" name="rcount" id="checkrount" value=""/>
              <input type="hidden" name="checkIds" id="checkIds" value=""/>
              <table class="treeTable searchform">
                  <thead>
                  <tr>
                      <td width="60">应聘岗位:</td>
                      <td >
                          <div>
                              <%-- <input type="text" name="jname"/>--%>

                              <select name="jname">
                                  <option value="">请选择</option>
                                  <c:forEach var="projectinfojobs" items="${jobs}" varStatus="item" >
                                      <c:choose>
                                          <c:when test="${projectinfojobs!=null}">
                                              <option value="${projectinfojobs.jobname}">${projectinfojobs.jobname}</option>
                                          </c:when>

                                      </c:choose>
                                  </c:forEach>
                              </select>
                          </div>
                      </td>
                      <td width="60">姓名:</td>
                      <td>
                          <div><input type="text" name="name"/></div>
                      </td>
                      <td width="60">身份证号:</td>
                      <td>
                          <div><input type="text" name="cardno"/></div>
                      </td>

                      <td width="60">所学专业:</td>
                      <td >
                          <div>
                              <input type="text" name="majorname"/>
                          </div>
                      </td>
                      <td width="60">毕业院校:</td>
                      <td >
                          <div>
                              <input type="text" name="university"/>
                          </div>
                      </td>


                  </tr>
                  <tr>
                      <td >毕业时间:</td>
                      <td>
                          <div><input type="text" name="graduationtime"/></div>
                      </td>
                      <td>联系电话:</td>
                      <td>
                          <div>
                              <input type="text" name="tel"/>
                          </div>
                      </td>
                      <td>最高学历:</td>
                      <td >
                          <div><select name="education">
                              <option value="-1">不限</option>
                              ${education}</select></div>
                      </td>
                      <td>短信通知:</td>
                      <td >
                          <div>
                              <select name="bdmsg">
                                  <option value="">全部</option>
                                  <option value="未发通知">未发通知</option>
                                  <option value="已发通知">已发通知</option>
                              </select>
                          </div>
                      </td>
                      <td>报到结果:</td>
                      <td >
                          <div>
                              <select name="bdstate">
                                  <option value="">全部</option>
                                  <option value="已报到">已报到</option>
                                  <option value="未报到">未报到</option>
                              </select>
                          </div>
                      </td>
                  </tr>
                  <tr class="moretj">
                      <td width="60">民族:</td>
                      <td width="150">
                          <div><select name="mzcode">
                              <option value="">不限</option>
                              ${minzu}</select></div>
                      </td>
                      <td width="60">政治面貌:</td>
                      <td width="150">
                          <div><select name="zzmmcode">
                              <option value="">不限</option>
                              ${zzmm}</select></div>
                      </td>
                      <td width="60" style="text-align:right;">年龄:</td>
                      <td width="160">
                          <div><input type="text" name="agefrom" style="max-width: 40%"/>至<input type="text" name="ageto" style="max-width: 40%"/></div>
                      </td>
                      <%-- <td width="16" style="text-align:center;">至</td>
                       <td width="60">
                           <div><input type="text" name="ageto"/></div>
                       </td>--%>
                      <td width="60" style="text-align:right;">身高:</td>
                      <td width="160">
                          <div><input type="text" name="heightfrom" style="max-width: 40%"/>至<input type="text" name="heightto" style="max-width: 40%"/></div>
                      </td>
                      <%--  <td width="36" style="text-align:center;">至</td>
                        <td width="50">
                            <div></div>
                        </td>--%>
                      <td width="60">性别:</td>
                      <td>
                          <div>
                              <select name="sex">
                                  <option value="">不限</option>
                                  <option value="男">男</option>
                                  <option value="女">女</option>
                              </select>
                          </div>
                      </td>
                  </tr>
                  <tr class="moretj">


                      <td>户口所在地:</td>
                      <td>
                          <div><input type="text" name="hukouaddress"/></div>
                      </td>
                      <td>现居住地:</td>
                      <td>
                          <div><input type="text" name="nowaddress"/></div>
                      </td>
                      <td>是否放弃:</td>
                      <td>
                          <div>
                              <select name="fqstate">
                                  <option value="">全部</option>
                                  <option value="未放弃" selected>未放弃</option>
                                  <option value="已放弃">已放弃</option>
                              </select>
                          </div>
                      </td>
                      <td  style="text-align:right;">工作年限:</td>
                      <td >
                          <div><input type="text" name="workyearfrom" style="max-width: 40%"/>至<input type="text" name="workyearto" style="max-width: 40%"/></div>
                      </td>

                      <td>职业资格证:</td>
                      <td>
                          <div><select name="qllevelpid" id="s_jndjp">
                              <option value="">不限</option>
                              ${jndj}</select></div>
                      </td>
                  </tr>
                  <tr class="moretj">
                      <td>简历状态:</td>
                      <td >
                          <div> <select name="state">
                              <option value="">不限</option>
                              <option value="未处理">未处理</option>
                              <option value="已通过">已通过</option>
                              <option value="未通过">未通过</option>
                          </select></div>
                      </td>
                      <td>意向地点:</td>
                      <td >
                          <div>
                              <input type="text" name="presentsalaryamount"/>
                          </div>
                      </td>
                      <td colspan="6"></td>
                  </tr>
                  <tr>
                      <td colspan="2">
                          <div class="toolbars">
                              <a id="searchbtn">
                                  <em class="ico16 search_16"></em>
                                  <span >查询</span>
                              </a>
                              <a id="clearbtn">
                                  <em class="ico16 refresh_16"></em>
                                  <span>清除</span>
                              </a>
                          </div>
                          <%--  <div style="padding-top: 8px;"> <button id="searchbtn" type="button" class="search"></button>
                                <button id="clearbtn" type="reset" class="del" title="清除" style="flex: 1;margin-left: 5px;"></button>
                            </div>--%>
                      </td>
                      <td colspan="8">
                          <div class="toolbars">
                              <a onclick="moreparam()">
                                  <em class="ico16 search_disable_16"></em>
                                  <span >高级查询</span>
                              </a>
                          </div>
                          <%--<button id="showhidebtn" type="button" class="moretjbtn0" onclick="moreparam()"
                                  title="高级查询"></button>--%>
                      </td>
                  </tr>
                  </thead>
              </table>
          </form>
      </div>
  <%--  <div id="searchbox">
        <form id="sform">
            <input type="hidden" name="pid" value="${pid}"/>
            <input type="hidden" name="deptcode" value="${deptcode}"/>
            <table class="treeTable searchform">
                <thead>
                <tr>
                    <td width="60">员工号:</td>
                    <td width="120">
                        <div><input type="text" name="code"/></div>
                    </td>
                    <td width="40">姓名:</td>
                    <td width="120">
                        <div><input type="text" name="name"/></div>
                    </td>
                    <td width="60">性别:</td>
                    <td width="120">
                        <div>
                            <select name="sex">
                                <option value="">全部</option>
                                <option value="男">男</option>
                                <option value="女">女</option>
                            </select>
                        </div>
                    </td>
                    <td width="60">报到状态:</td>
                    <td width="120">
                        <div>
                            <select name="state">
                                <option value="">全部</option>
                                <option value="已报到">已报到</option>
                                <option value="未报到">未报到</option>
                            </select>
                        </div>
                    </td>
                    <td width="30"></td>
                    <td></td>
                </tr>
                <tr>
                    <td>政治面貌:</td>
                    <td>
                        <div><input type="text" name="zzmm"/></div>
                    </td>
                    <td>学历:</td>
                    <td>
                        <div><input type="text" name="education"/></div>
                    </td>
                    <td>短信通知:</td>
                    <td>
                        <div>
                            <select name="bdmsg">
                                <option value="">全部</option>
                                <option value="未发通知">未发通知</option>
                                <option value="已发通知">已发通知</option>
                            </select>
                        </div>
                    </td>
                    <td>是否放弃:</td>
                    <td>
                        <div>
                            <select name="fqstate">
                                <option value="">全部</option>
                                <option value="未放弃" selected>未放弃</option>
                                <option value="已放弃">已放弃</option>
                            </select>
                        </div>
                    </td>
                    <td>
                        <button id="searchbtn" type="button" class="search"></button>
                    </td>
                    <td></td>
                </tr>
                </thead>
            </table>
        </form>
    </div>--%>
    <%--<form id="Validform" method="post" action="/Do/NZEmploy/RAction?pid=${pid}&fid=${fid}&deptcode=${deptcode}">
        <button type="submit" id="okbtn" style="display:none;"></button>
        <table class="treeTable" id="tablelist">
            <thead>
            <tr>
                <td width="20"><input type="checkbox" class="allcheckbox" title="选择全部/取消全选"/></td>
                <td width="25">序号</td>
                <td width="40">员工号</td>
                <td width="50">姓名</td>
                <td width="100">联系方式</td>
                <td width="100">报到时间</td>
                <td>报到地点</td>
                <td width="120">报到联系方式</td>
                <td width="80">短信通知</td>
                <td width="100">报到状态</td>
                <td></td>
            </tr>
            </thead>
            <tbody id="result"></tbody>
        </table>
    </form>
    <div id="page"></div>--%>
      <table class="layui-hide" id="tablelistNzEmploy" lay-filter="listTables"></table>
</div>
<script charset="utf-8" src="/resources/js/plugins/kindeditor-4.1.10/kindeditor-min.js"></script>
<script charset="utf-8" src="/resources/js/plugins/kindeditor-4.1.10/lang/zh_CN.js"></script>
<script type="text/javascript">
    $("#searchbox").width($(window).width()-10);

    var ptypes = "NZEmploy";

    //消息通知
    $('#send_news').on('click',function () {
        getTableChecks();

        $('#infospanel').slideToggle(300);
        $(this).toggleClass('cur').blur().siblings().removeClass('cur');
        if (!$('#msgpanel').is(":hidden")) {
            $('#msgpanel').slideToggle(300);
        }
        if (!$('#resultpanel').is(":hidden")) {
            $('#resultpanel').slideToggle(300);
        }
        if (!$('#hrpanel').is(":hidden")) {
            $('#hrpanel').slideToggle(300);
        }
    });

    $('#clearbtn').on('click',function () {
        document.getElementById("sform").reset();
    });
    getMsg();


    var selectDataTemp = [];
    function getTableChecks(){
        var selectData = layui.table.checkStatus('listTables').data;

        if(selectDataTemp.length > 0){
            for(var i=0;i<selectDataTemp.length;i++){
                $('#bdusers input').each(function () {
                    if ($(this).val() == selectDataTemp[i].id_cb.replace('cb_', ''))
                        $(this).remove();
                });
                $('#msgusers input').each(function () {
                    if ($(this).val() == selectDataTemp[i].id_cb.replace('cb_', ''))
                        $(this).remove();
                });
                $('#rusers input').each(function () {
                    if ($(this).val() == selectDataTemp[i].id_cb.replace('cb_', ''))
                        $(this).remove();
                });
                $('#hrusers input').each(function () {
                    if ($(this).val() == selectDataTemp[i].id_cb.replace('cb_', ''))
                        $(this).remove();
                });
                $('#infosuers input').each(function () {
                    if ($(this).val() == selectDataTemp[i].id_cb.replace('cb_', ''))
                        $(this).remove();
                });
                $('#infosuerCardnos input').each(function () {
                    if ($(this).val() == selectDataTemp[i].CARDNO)
                        $(this).remove();
                });
            }
        }

        if(selectData.length == 0){
            selectDataTemp = selectData;
        }else{
            for(var i=0;i<selectData.length;i++){
                $('#bdusers').append('<input type="hidden" name="uid" value="' + selectData[i].id_cb.replace('cb_', '') + '"/>');
                $('#msgusers').append('<input type="hidden" name="uid" value="' + selectData[i].id_cb.replace('cb_', '')  + '"/>');
                $('#rusers').append('<input type="hidden" name="uid" value="' + selectData[i].id_cb.replace('cb_', '')  + '"/>');
                $('#hrusers').append('<input type="hidden" name="uid" value="' + selectData[i].id_cb.replace('cb_', '')  + '"/>');
                $('#infosuers').append('<input type="hidden" name="id" value="' + selectData[i].id_cb.replace('cb_', '') + '"/>');
                $('#infosuerCardnos').append('<input type="hidden" name="cardno" value="' + selectData[i].CARDNO + '"/>');
            }
            selectDataTemp = selectData;
        }
    }


    //报到安排
    $('#bd_plan').click(function () {
        getTableChecks();

        var title="报到安排";
        $('#planpanel').hide();

        var bdPlans=layer.open({
            type:1
            ,title:title
            ,content: $('#planpanel')
            ,skin: 'flowForm-lys'
            ,area:  ['800px','300px']
            ,cancel: function(){
                $('#planpanel').hide();
            }
        });
    });

    //报到通知
    $('#bd_msg').click(function () {
        getTableChecks();
        $('#msgpanel').slideToggle(300);
        $(this).toggleClass('cur').blur().siblings().removeClass('cur');
        if (!$('#resultpanel').is(":hidden")) {
            $('#resultpanel').slideToggle(300);
        }
        if (!$('#hrpanel').is(":hidden")) {
            $('#hrpanel').slideToggle(300);
        }
        if (!$('#infospanel').is(":hidden")) {
            $('#infospanel').slideToggle(300);
        }
    });

    $('#dxmb').change(function () {
        getMsg();
    });

    //报到结果
    $('#bd_result').click(function () {
        getTableChecks();
        $('#resultpanel').slideToggle(300);
        $(this).toggleClass('cur').blur().siblings().removeClass('cur');
        /* if (!$('#planpanel').is(":hidden")) {
             $('#planpanel').slideToggle(300);
         }*/
        if (!$('#msgpanel').is(":hidden")) {
            $('#msgpanel').slideToggle(300);
        }
        if (!$('#hrpanel').is(":hidden")) {
            $('#hrpanel').slideToggle(300);
        }
        if (!$('#infospanel').is(":hidden")) {
            $('#infospanel').slideToggle(300);
        }
    });

    //同步到HR
    $('#bd_HR').click(function () {
        getTableChecks();
        $('#hrpanel').slideToggle(300);
        $(this).toggleClass('cur').blur().siblings().removeClass('cur');
        /*  if (!$('#planpanel').is(":hidden")) {
              $('#planpanel').slideToggle(300);
          }*/
        if (!$('#msgpanel').is(":hidden")) {
            $('#msgpanel').slideToggle(300);
        }
        if (!$('#resultpanel').is(":hidden")) {
            $('#resultpanel').slideToggle(300);
        }
        if (!$('#infospanel').is(":hidden")) {
            $('#infospanel').slideToggle(300);
        }
    });

    //导出照片
    $('#bd_down').click(function () {
        location = '${fpath}/API/OutUserImg?pid=${pid}';
    });

    function getMsg() {
        getAjax('/Do/BS/getMsg?code=' + $('#dxmb').val(), null, function (data) {
            $('textarea[name=dxnr]').val(data);
        });
    }

    $('#resume_output').click(function () {
        var ids= $('#checkIds').val('').val();
        var selectData = layui.table.checkStatus('listTables').data;
        if(selectData!=undefined&&selectData.length>0){
            for(var i=0;i<selectData.length;i++){
                ids += selectData[i].id_cb.replace('cb_', '') + ',';
            }
            ids=ids.substr(0,ids.length-1);
            $('#checkIds').val(ids);
        }
        openpLayer('请选择要导出的字段', '/ExcelDown/DownDoResume?pid=${pid}&fid=${fid}&deptcode=${deptcode}&'+$('#sform').serialize(), '60%', '70%');
    });

    $('#resume_input').click(function () {
        openpLayer('Excel数据导入', '/ExcelImport/ImportExcelPage?pid=${pid}&fid=${fid}&deptcode=${deptcode}&'+$('#sform').serialize(), '60%', '500px');
    });

    var NzEmployTable;
    var sdat;

    layui.config({
        base: '<%=basepaths%>/resources/js/plugins/ext/',   // 模块目录
        version: 'v1.5.10' // 插件版本号
    }).extend({
        soulTable: 'soulTable',// 模块别名
        tableChild: 'tableChild',
        tableMerge: 'tableMerge',
        tableFilter: 'tableFilter',
        // excel: 'excel',
    });

    layui.use(['table','soulTable','tableChild','tableMerge','tableFilter'], function(){
        var soulTable = layui.soulTable,
            tableChild = layui.tableChild,
            tableMerge = layui.tableMerge,
            tableFilter = layui.tableFilter,
            $ = layui.$;

        NzEmployTable = layui.table;
        sdat = '${path}/Do/NZEmploy/getNzEmployListLayuiJson?flowid=${fid}&'+$('#sform').serialize();

        NzEmployTable.render({
            id:'listTables'
            ,elem: '#tablelistNzEmploy'
            ,url: sdat
            ,title:'用户数据表'
            , height: 'full'
            //  ,cellMinWidth: 40 //全局定义常规单元格的最小宽度，layui 2.2.1 新增
            ,contextmenu: {
                // 表格内容右键菜单配置
                body: [
                ]
            }

            ,cols: [[
                {type:'checkbox',fixed:'center',}
                ,{field:'id', title: '序号', fixed:'center',sort: true,Width:80}
                ,{field:'CODE', title: '简历编号', fixed:'center',sort: true,minWidth:110}
                ,{field:'NAME',title: '姓名', fixed:'left',sort: true,minWidth:100,templet: function(d){
                        return '<a target="_blank" href="' + d.ContextPath + '">' +d.NAME;
                    }}
                ,{field:'JNAME', title: '应聘岗位', fixed:'center', sort: true,minWidth:130}
             //   ,{field:'CARDNO',title: '身份证号', fixed:'center',minWidth:160}
                ,{field:'JOBNUMBER',title: '工号', fixed:'center',minWidth:80}
                ,{field:'EDUCATIONNAME', title: '学历', fixed:'center', sort: true,minWidth:110}
                ,{field:'WORKEXPERIENCE', title: '工作经验', fixed:'center', sort: true,minWidth:110}
                ,{field:'TEL', title: '联系方式', fixed:'center', sort: true,minWidth:120}
                ,{field:'BDTIME', title: '报到时间', fixed:'center', sort: true,minWidth:150}
                ,{field:'BDLXRs', title: '报到通知', fixed:'center', sort: true,minWidth:150}
                ,{field:'BDMSG', title: '报到结果', fixed:'center', sort: true,minWidth:110}
                ,{field:'BDBZ', title: '报到备注', fixed:'center', sort: true,minWidth:110}
                ,{field:'arrange', title: '公布安排', fixed:'center', sort: true,minWidth:110,templet: function(d){
                        if(!d.arrange || d.arrange === "未公布")
                            return '<span class="layui-badge layui-bg-orange">未公布</span>';
                        else
                            return '<span class="layui-badge layui-bg-green">'+d.arrange+'</span>';
                    }}
                ,{field:'STATEb', title: '公布结果', fixed:'center', sort: true,minWidth:110,templet: function(d){
                        if(d.STATEb == "未公布")
                            return '<span class="layui-badge layui-bg-orange">'+d.STATEb+'</span>';
                        else
                            return '<span class="layui-badge layui-bg-green">'+d.STATEb+'</span>';
                    }}
                ,{field:'STATEc',  title: '', fixed:'center', sort: true,minWidth:100,templet: function(d){
                        switch(d.STATEc){
                            case "已放弃" :
                                return '<span class="yfq">'+d.STATEc+'</span>';
                                break;
                            case "已推荐" :
                                return '<span class="ytj">'+d.STATEc+'</span>';
                                break;
                            case "未完成" :
                                return '<span class="layui-badge layui-bg-orange">'+d.STATEc+'</span>';
                                break;
                            case "已完成" :
                                return '<span class="layui-badge layui-bg-green">'+d.STATEc+'</span>';
                                break;
                            default: '<span></span>'; break;
                        }}}
            ]]
            ,page: true
            , done: function () {
                soulTable.render(this);
            }
        });

        $("#searchbtn").on('click', () => {
            tableRenders();
        });
    });

    function tableRenders() {
        sdat = '${path}/Do/NZEmploy/getNzEmployListLayuiJson?flowid=${fid}&'+$('#sform').serialize();
        //执行重载
        NzEmployTable.reload('listTables', {
            url: sdat
            ,method: 'get'
            ,page:  {
                curr: 1 //重新从第 1 页开始
            }
            ,where: {
            }
        }, 'data');
    }

/*    $(document).ready(function () {
        getMsg();
        getList();
        $('#searchbtn').click(function () {
            getList();
        });

        $('#savebtn').click(function () {
            $('#okbtn').click();
        });

        //报到安排
        $('#nz_lyplan').click(function () {
            $('#planpanel').slideToggle(300);
            $(this).toggleClass('cur').blur().siblings().removeClass('cur');
            if (!$('#msgpanel').is(":hidden")) {
                $('#msgpanel').slideToggle(300);
            }
        });

        //全选当页
        $(document).delegate('.allcheckbox', 'click', function () {
            $('#bdusers').html('');
            $('#msgusers').html('');
            $(this).parent().parent().parent().next().find('input[type=checkbox]').each(function () {
                if ($(this).is(":checked")) {
                    $('#bdusers').append('<input type="hidden" name="uid" value="' + $(this).val() + '"/>');
                    $('#msgusers').append('<input type="hidden" name="uid" value="' + $(this).val() + '"/>');
                }
            });
        });
        //选择一条
        $(document).delegate('#tablelist tbody tr', 'click', function () {
            var ck = $(this).find('input[type=checkbox]');
            if (ck.is(":checked")) {
                $('#bdusers').append('<input type="hidden" name="uid" value="' + ck.val() + '"/>');
                $('#msgusers').append('<input type="hidden" name="uid" value="' + ck.val() + '"/>');
            } else {
                $('#bdusers input').each(function () {
                    if ($(this).val() == ck.val())
                        $(this).remove();
                });
                $('#msgusers input').each(function () {
                    if ($(this).val() == ck.val())
                        $(this).remove();
                });
            }
        });

        //报到通知
        $('#nz_lymsg').click(function () {
            $('#msgpanel').slideToggle(300);
            $(this).toggleClass('cur').blur().siblings().removeClass('cur');
            if (!$('#planpanel').is(":hidden")) {
                $('#planpanel').slideToggle(300);
            }
        });

        $('#dxmb').change(function () {
            getMsg();
        });


    });

    function getList() {
        $('#page').myPagination({
            cssStyle: "pagination",
            ajax: {
                on: true,
                url: '/Do/NZEmploy/getusers?flowid=${fid}',
                param: $('#sform').serialize(),
                dataType: 'html',
                callback: function (data) {
                    $('#result').html(data);
                    $('#result select').each(function () {
                        $(this).val($(this).next().val());
                    });
                    $('#bdusers').html('');
                    $('#msgusers').html('');
                }
            }
        });
    }

    function getMsg() {
        getAjax('/Do/NZEmploy/getMsg?code=' + $('#dxmb').val(), null, function (data) {
            $('textarea[name=dxnr]').val(data);
        });
    }*/
</script>
</body>
</html>